#pragma once

class CSelectIconDlg
	: public CBkDialogImpl<CSelectIconDlg>
	,public CWHRoundRectFrameHelper<CSelectIconDlg>
{
public:
	CSelectIconDlg(void): CBkDialogImpl<CSelectIconDlg>(IDR_BK_SELECTICON_DLG)
	{
	}
	~CSelectIconDlg(void);
	LRESULT		OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
	BOOL		OnInitDialog(HWND wParam, LPARAM lParam);	
	LRESULT		OnDestroy(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
	void		OnBkBtnClose();
	void		OnBkBtnSure();	
public:
	BK_NOTIFY_MAP(IDC_RICHVIEW_WIN);
		BK_NOTIFY_ID_COMMAND(IDC_BTN_SYS_CLOSE,					OnBkBtnClose)
		BK_NOTIFY_ID_COMMAND(IDC_SELECT_ICON_BTN_OK,			OnBkBtnSure)
		BK_NOTIFY_ID_COMMAND(IDC_SELECT_ICON_BTN_CANCEL,		OnBkBtnClose)		
	BK_NOTIFY_MAP_END()

	BEGIN_MSG_MAP_EX(CSelectIconDlg)	
		MSG_BK_NOTIFY(IDC_RICHVIEW_WIN)
		CHAIN_MSG_MAP(CBkDialogImpl<CSelectIconDlg>)
		CHAIN_MSG_MAP(CWHRoundRectFrameHelper<CSelectIconDlg>)
		MESSAGE_HANDLER(WM_CREATE,				OnCreate)
		MESSAGE_HANDLER(WM_DESTROY,				OnDestroy)	
		MSG_WM_INITDIALOG(OnInitDialog)	

		REFLECT_NOTIFICATIONS_EX()
	END_MSG_MAP()		 
	CImageList*			m_pImageList;
	UINT				m_uNumIcons;

	int					m_nSelectedIcon;
private:
	void _init();
	CListViewCtrl		m_ListIcon;


};
